<?php

//注册自定义文章类型

//注册文章类型：人员
add_action('init', 'custom_post_staff_init');

function custom_post_staff_init() {
	$labels =  array (
		'name' => 'Staffs',
		'singular_name' => 'Staff',
		'menu_name' => 'Staffs',
		'add_new' => 'Add New',
		'add_new_item' => 'Add New Staff',
		'edit' => 'Edit',
		'edit_item' => 'Edit Staff',
		'new_item' => 'New Staff',
		'view' => 'View Staff',
		'view_item' => 'View Staff',
		'search_items' => 'Search Staff',
		'not_found' => 'No Staff Found',
		'not_found_in_trash' => 'No Staffs found in Trash',
		'parent' => 'Parent Staffs'
	);
	$args =  array(
		'label' => 'Staffs',
		'description' => '人员',
		'public' => true,
		'show_ui' => true,
		'show_in_menu' => true,
		'capability_type' => 'post',
		'hierarchical' => true,
		'rewrite' => array('slug' => 'staff'),
		'query_var' => true,
		'has_archive' => true,
		'menu_position' => 7,
		'supports' => array('title','editor','excerpt','trackbacks','custom-fields','comments','revisions','thumbnail','author','page-attributes',),
		'taxonomies' => array('category','post_tag',),
		'labels' => $labels
	);
	
	register_post_type('staffs', $args);

}


//注册文章类型：通知
add_action('init', 'custom_post_notice_init');

function custom_post_notice_init() {
	$labels =  array (
		'name' => 'Notices',
		'singular_name' => 'Notice',
		'menu_name' => 'Notices',
		'add_new' => 'Add New',
		'add_new_item' => 'Add New Notice',
		'edit' => 'Edit',
		'edit_item' => 'Edit Notice',
		'new_item' => 'New Notice',
		'view' => 'View Notice',
		'view_item' => 'View Notice',
		'search_items' => 'Search Notice',
		'not_found' => 'No Notice Found',
		'not_found_in_trash' => 'No Notices found in Trash',
		'parent' => 'Parent Notices'
	);
	$args =  array(
		'label' => 'Notices',
		'description' => '通知',
		'public' => true,
		'show_ui' => true,
		'show_in_menu' => true,
		'capability_type' => 'post',
		'hierarchical' => true,
		'rewrite' => array('slug' => 'notice'),
		'query_var' => true,
		'has_archive' => true,
		'menu_position' => 4,
		'supports' => array('title','editor','excerpt','trackbacks','custom-fields','comments','revisions','thumbnail','author','page-attributes',),
		'taxonomies' => array('category','post_tag',),
		'labels' => $labels
	);
	
	register_post_type('notices', $args);

}


//注册文章类型：成果  （学术、著作、论文、Working Paper）
add_action('init', 'custom_post_achievement_init');

function custom_post_achievement_init() {
	$labels =  array (
		'name' => 'Achievements',
		'singular_name' => 'Achievement',
		'menu_name' => 'Achievements',
		'add_new' => 'Add New',
		'add_new_item' => 'Add New Achievement',
		'edit' => 'Edit',
		'edit_item' => 'Edit Achievement',
		'new_item' => 'New Achievement',
		'view' => 'View Achievement',
		'view_item' => 'View Achievement',
		'search_items' => 'Search Achievement',
		'not_found' => 'No Achievement Found',
		'not_found_in_trash' => 'No Achievements found in Trash',
		'parent' => 'Parent Achievements'
	);
	$args =  array(
		'label' => 'Achievements',
		'description' => '学术成果',
		'public' => true,
		'show_ui' => true,
		'show_in_menu' => true,
		'capability_type' => 'post',
		'hierarchical' => true,
		'rewrite' => array('slug' => 'achievement'),
		'query_var' => true,
		'has_archive' => true,
		'menu_position' => 4,
		'supports' => array('title','editor','excerpt','trackbacks','custom-fields','comments','revisions','thumbnail','author','page-attributes',),
		'taxonomies' => array('category','post_tag',),
		'labels' => $labels
	);
	
	register_post_type('achievements', $args);

}

